home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 352_01 / vlistpop.cpp < prev    next >
C/C++ Source or Header  |  1991-04-25  |  373b  |  19 lines

  1. // VLISTPOP.CPP 
  2. //        code for Vlist::pop(), removes top item from vlist stack.
  3. #include "dblib.h"
  4.  
  5.         void  Vlist::pop ( void )
  6.             {
  7.             void **vl = list;
  8.             register int vn =n;
  9.             
  10.             if ( vn>0 )
  11.                 {
  12.                 n = --vn;
  13.                 free ( vl[vn] );
  14.                 vl [vn] = NULL;
  15.                 }
  16.             return;    /* Vlist::pop() */
  17.             }
  18.  
  19.     //----------------- end VLISTPOP.CPP -------------------